package com.weiwei.diancan.adapter;

import android.view.View;
import android.widget.TextView;

import com.weiwei.diancan.R;
import com.weiwei.diancan.bean.FindOrderBean;

import java.util.List;

import weiwei.com.weiweilibrary.adapter.BaseQuickAdapter;
import weiwei.com.weiweilibrary.holder.BaseViewHolder;

/**
 * Created by weiwei on 2017/4/11.
 * Describe:
 */

public class PaihangAdapter extends BaseQuickAdapter<FindOrderBean.DishListBean> {

    public PaihangAdapter(List<FindOrderBean.DishListBean> data) {
        super(R.layout.item_paihang, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FindOrderBean.DishListBean item, int position) {
        TextView tv_tao = helper.getView(R.id.tv_tao);
        TextView tv_name = helper.getView(R.id.tv_name);
        TextView tv_num = helper.getView(R.id.tv_num);

        tv_name.setText(item.getLog_name());
        tv_num.setText(item.getCounts());
        if(item.getLog_type().equals("1")){
            tv_tao.setVisibility(View.VISIBLE);
        }else{
            tv_tao.setVisibility(View.GONE);
        }
    }
}
